home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / APPLICAT / C034.ZIP / DBQ.NRO < prev    next >
Text File  |  2010-11-01  |  50KB  |  1,432 lines

  1. .de TH
  2. .in 4
  3. .rm 76
  4. .he |$0|$2|$1|
  5. .fo ||-#-||
  6. .in 8
  7. .rm 72
  8. .bp
  9. .en
  10. .de CH
  11. .in 4
  12. .rm 76
  13. .he |$0|$2|$1|
  14. .fo ||-#-||
  15. .in 8
  16. .rm 72
  17. .bp
  18. .SH "Syntax"
  19. .en
  20. .de PP
  21. .sp 1
  22. .ti +4
  23. .en
  24. .de SH
  25. .sp 1
  26. .ti -4
  27. .bo
  28. $0
  29. .sp
  30. .en
  31. .de HB
  32. .sp 2
  33. .SH "Details"
  34. .sp
  35. .in 10
  36. .en
  37. .de HY
  38. .br
  39. .ti -2
  40. -
  41. .en
  42. .de EH
  43. .sp
  44. .in 8
  45. .en
  46. .TH "List of contents" CONTENTS "DBQ database query language"
  47. .sp
  48. INTRODUCTION
  49. .sp
  50. .in +8
  51. Introduction
  52. .br
  53. Overview of facilities
  54. .sp
  55. .in -8
  56. COMMANDS
  57. .sp
  58. .in +8
  59. Commands
  60. .br
  61. Interaction
  62. .br
  63. Procedures
  64. .br
  65. Command files
  66. .br
  67. Comments
  68. .br
  69. Editing
  70. .br
  71. File names
  72. .br
  73. Selection expressions
  74. .br
  75. Relational operators
  76. .br
  77. Aliases
  78. .br
  79. Notation
  80. .sp
  81. .in -8
  82. COMMAND REFERENCE
  83. .sp
  84. .in +8
  85. create
  86. .br
  87. insert
  88. .br
  89. update
  90. .br
  91. print
  92. .br
  93. find
  94. .br
  95. import
  96. .br
  97. export
  98. .br
  99. extract
  100. .br
  101. compress
  102. .br
  103. sort
  104. .br
  105. erase
  106. .br
  107. rename
  108. .br
  109. define
  110. .br
  111. show
  112. .br
  113. enter
  114. .br
  115. set
  116. .br
  117. help
  118. .br
  119. exit
  120. .br
  121. command file inclusion (@)
  122. .sp
  123. .in -8
  124. DATABASE MAINTENANCE
  125. .sp
  126. .in +8
  127. Introduction
  128. .br
  129. Setting up
  130. .br
  131. Security
  132. .br
  133. Reformatting
  134. .sp
  135. .in -8
  136. USING THE DATABASE
  137. .sp
  138. .in +8
  139. General points
  140. .br
  141. Query style
  142. .br
  143. Making a log file
  144. .br
  145. Joining multiple databases
  146. .br
  147. Limits
  148. .sp
  149. .in -8
  150. REPORT FORMATTING
  151. .sp
  152. .in +8
  153. Report formatting
  154. .br
  155. Field specifiers
  156. .br
  157. Heading specification
  158. .br
  159. Pause specification
  160. .br
  161. Uses of format files
  162. .sp
  163. .in -8
  164. MESSAGES AND ERRORS
  165. .sp
  166. .in +8
  167. Introduction
  168. .br
  169. Informational messages
  170. .br
  171. Error messages
  172. .br
  173. Other error situations
  174. .sp
  175. .TH "Introduction" "INTRODUCTION" "DBQ Database query language"
  176. .SH "Introduction"
  177. DBQ is a powerful structured query language modelled on query language
  178. facilities available on large minicomputers. It is designed for use by
  179. those wanting an English like command language to enter
  180. database manipulation commands, rather than a menu driven interface.
  181. Because of this it cannot be used immediately by a
  182. complete novice in the same manner as menu driven systems, but it is easy
  183. to learn the basic commands in a few hours, and once
  184. learnt, it is considerably faster and more flexible to use.
  185. .sp
  186. The commands operate against disk resident files. Because of this, there
  187. is no need to load or save database files explicitly, and the system is
  188. more resilient to power failures. However, due to the disk accessing, the
  189. processing is generally slower than memory resident databases.
  190. .sp
  191. The query language provides a comprehensive set of functions for the
  192. creation, maintenance and enquiry of the database format supported by
  193. the DBQ system.
  194. .sp
  195. The query language is the prime means of interaction with the database
  196. and it is important to become properly conversant with the many powerful
  197. commands before undertaking any major work using it.
  198. .sp
  199. Because there is a finite limit on memory, many features found in more
  200. expensive databases have been left out of DBQ. Whilst important, these
  201. are by no means essential for personal databases. Such features include
  202. full arithmetic capabilities for updating fields and reporting, full
  203. report formatting with control totals, validation of input data at entry
  204. and high speed keyed access to data. Because of these, and other limitations,
  205. the database should be considered unsuitable for large scale commercial usage.
  206. .SH "Overview of facilities"
  207. Database level commands permit the creation of a database, erasing a database,
  208. renaming a database, sorting a database on one or more fields, importing and
  209. exporting database records from and to external applications, and compressing
  210. a database to remove any deleted records from it.
  211. .sp
  212. Record level commands include the insertion of records interactively or from
  213. a data file, the updating of selected records, the deletion of selected
  214. records, the selection of records into a working database, and the listing
  215. of selected records in tabular form or in a form specified by a format file.
  216. .sp
  217. Specific fields can be selected in the update, find and print operations,
  218. and it is possible to do a relational join operation, whereby selected fields
  219. from two or more databases can be selected from records matched on some field
  220. or fields in the databases.
  221. .sp
  222. Sequences of commands and data can be input from a file, and short sequences
  223. of commands can be defined as procedures, which can be executed simply by
  224. use of a keyword. In fact, simple groups of words can be defined in this way
  225. allowing aliases for keywords and keyword combinations. The command files
  226. and procedures can input variable data to be used in the evaluation of the
  227. command file or procedure. Command files and procedures can be nested to a
  228. certain level.
  229. .sp
  230. Various options can be set, allowing control of the case sensitivity,
  231. causing a command file to be listed as it is executed, and switching
  232. a log file in or out to permit keyboard input to be logged for a number
  233. of purposes. Also tabulations can be split into pages, and the page length
  234. can be varied to accommodate different lengths of paper or different print
  235. formatting.
  236. .sp
  237. Full online help is provided, permitting selection by initial letter of
  238. help topics.
  239. .sp
  240. The command line input uses the CPM+ line input facilities, permitting full
  241. editing to be carried out on the current line, including the copying of the
  242. previous command using ^W. You are referred to the CPM+ documentation or
  243. the CPM+ help file for more information on this.
  244. .sp
  245. The database is initially built to hold 10 records, but grows as new records
  246. are added. Records are updated in situ, and are deleted by flagging them as
  247. deleted. Deleted records can be compressed out of the database, and for
  248. occasions where a deletion selection was a bit too greedy it is possible
  249. to dump the deleted records out to a file for subsequent editing and
  250. re-input.
  251. .TH "Command reference" COMMANDS "DBQ Command Reference"
  252. .SH COMMANDS
  253. This section details each command in turn, providing the format of the
  254. command and details of the commands action. An example is also provided.
  255. .SH Interaction
  256. Commands may be entered in free form. This means that line termination
  257. has no special meaning, and any number of spaces or tabs can be inserted
  258. at the start or end of a line or between elements. A command may be
  259. broken over more than one line, whereupon continuation prompts are issued
  260. to show that further input is expected. Where the end of a command has
  261. to be indicated, for example at the end of a print selection, either a
  262. new command or the command terminator ";" may be used. More than one
  263. command can be issued on the same line, although it is usually prudent
  264. to let each command execute before issuing the next in case of failure,
  265. and because an error will cause unused input for a command to be rejected
  266. as a syntax error.
  267. .SH Procedures
  268. Procedures provide a means of entering a predefined block of text as
  269. input, identified by a name. They are included in the input by simply
  270. using their name, and can be used at any point of input where a keyword
  271. or identifier is expected. They can represent anything from a single
  272. word up to a set of commands, and can contain statements within
  273. them to prompt for variable data to be used when expanding them.
  274. .SH "Command files"
  275. Command files are like procedures, but instead of fetching text from
  276. memory, the text is input from a file. The text can represent anything
  277. a procedure can represent, and can also contain prompting statements,
  278. for use as variable input, or as pauses in the command file execution.
  279. .SH Comments
  280. Comments can be put on any line after a number sign "#",
  281. this usually being used for command files, or when logging the input. The
  282. comment acts as a command terminator, so cannot be inserted halfway through
  283. a command.
  284. .SH Editing
  285. Line input is done via the CP/M line input routine, permitting editing to
  286. be done on the current input line, and the previous line to be recalled.
  287. This is useful when entering a long query line, as errors can be easily
  288. corrected. Data input for the INSERT and UPDATE functions is also done
  289. via this routine.
  290. .SH "File names"
  291. File names with extensions indicated can be entered simply as the
  292. name without the extension, or if another extension is used, they may
  293. be entered within quotes, whereupon this is used as the full name.
  294. Database names cannot under most circumstances be entered as a string,
  295. and should always be entered as an identifier. A drive prefix can be
  296. put on any filename in either form, but a user area specifier is not
  297. permitted when entered in identifier form.
  298. .SH "Selection expressions"
  299. A selection expression is a relational expression involving one or more
  300. database fields. A relational expression is simply a comparison between
  301. a field and a value (or another field). The types of comparison are called
  302. relational operators, and are listed below. A compound relational expression
  303. involving brackets and the logical operators 'and' and 'or' can be used
  304. to specify a complex selection.
  305. There follows some examples of selection expressions:-
  306. .sp
  307. balance > 10000
  308. .sp
  309. name } "Smith"
  310. .sp
  311. sex = "male" and (age > 65 or age < 20)
  312. .sp
  313. Note that in the last example, the brackets are necessary to join the
  314. two age comparisons together for use in the 'and' operation, otherwise
  315. the 'age < 20' would be separate and would satisfy the expression by
  316. itself.
  317. .SH "Relational operators"
  318. The relational operators are as follows.
  319. .sp
  320. =    Equals
  321. .sp
  322. >    Greater than
  323. .sp
  324. <    Less than
  325. .sp
  326. >=    Greater than or equal to
  327. .sp
  328. <=    Less than or equal to
  329. .sp
  330. <>    Not equal to
  331. .sp
  332. }    Contains (substring search)
  333. .sp
  334. For numeric fields, a numeric comparison is made. For character
  335. fields, a lexicographic comparison is made using the ASCII
  336. collating sequence. For the contains operator, a string search
  337. is done regardless of field type. The contains operator can be
  338. used as a "contained in" operator by simply reversing the
  339. operands (e.g. with "montuewed" } day).
  340. .bp
  341. .SH "Aliases"
  342. When specifying complex queries involving qualification of field
  343. names, and when joining a database with itself, a more convenient
  344. way of specifying fieldnames and database names is provided.
  345. .sp
  346. The alias notation permits a temporary name, or 'alias' to be
  347. specified for field names or database names. This is done by
  348. specifying the alias directly after the normal name, without the
  349. comma separator used to specify elements in a list. The alias name
  350. can be used wherever the original name can be used, apart from in the
  351. field list or database list used to specify the aliases. Typically it
  352. would be used in a selection expression, or in a format file. The field
  353. alias is also used in the title line in a tabulation, and as the field
  354. name in a current working database created by a FIND command.
  355. .sp
  356. For example, to join a family database between name and parent name,
  357. the following selection could be entered.
  358. .sp
  359. .nf
  360.     DBQ> print family.name, parents.age dads_age
  361.     DBQ> of family, family parents
  362.     DBQ> with family.parent = parents.name ;
  363. .fi
  364. .sp
  365. This shows the database "family" being given an alias "parents" to show
  366. which instance of the database the age in the print list and the name in
  367. the comparison should come from. The parents age field also has an alias
  368. specified "dads_age" to allow the report produced to have a more applicable
  369. heading.
  370. .SH Notation
  371. In this section, keywords are shown in uppercase, and other identifiers
  372. are shown in lowercase. This is done to permit the keywords to be easily
  373. identified, and does not imply that they must be used in uppercase. In fact
  374. the examples show normal command input in lowercase, and this is the
  375. recommended mode of use.
  376. .sp
  377. Square brackets indicate optional elements of the command language.
  378. A second occurence of an element or set of elements within square
  379. brackets generally indicates that the set can be repeated a number of times.
  380. .TH "Command Summary" SUMMARY "DBQ Command Reference"
  381. .in 0
  382. .nf
  383. CREATE database fieldname type size [scale] [fieldname type size [scale]]
  384. ERASE database
  385. RENAME database newname
  386. INSERT database
  387. DELETE selection ;
  388. UPDATE fieldnames OF selection ;
  389. PRINT [USING formatfile] fieldnames OF selection [INTO reportfile] ;
  390. FIND fieldnames OF selection ;
  391. SORT database BY fieldname [direction] [fieldname [direction]] ;
  392. IMPORT datafile INTO database
  393. EXPORT [DELETED] database [INTO datafile] ;
  394. EXTRACT database [INTO definitionfile] ;
  395. COMPRESS database
  396. DEFINE procedure / ENTER procedure
  397. SHOW {procedure} ;
  398. SET [NO] [FOLD] [VERIFY] [LOG] [PAGE [pagelength]] ;
  399. HELP
  400. EXIT
  401.  
  402.  
  403. Where identifiers are:-
  404.  
  405.  
  406. database, newname    : database file name (Identifier) (Ext. .DBQ)
  407. fieldnames        : qualfieldname[+] [, qualfieldname[+] ...] | all[+]
  408. qualfieldname        : [database.]fieldname
  409. fieldname        : field name (identifier)
  410. type            : NUM | CHAR
  411. size            : 1 to 12 NUM, 1 to 128 CHAR
  412. scale            : 0 to 10 for NUM fields only
  413. direction        : ASC (default) | DESC
  414. selection        : database [, database ... ] WITH expression
  415. expression        : [NOT] comparison [AND | OR [NOT] comparison ...]
  416. comparison        : primary relation primary
  417. primary            : qualfieldname | string | number
  418. relation        : = | > | < | >= | <= | <> | }
  419. procedure        : procedure name (Identifier)
  420. pagelength        : length of paper in lines less 6 for heading
  421. datafile        : data file name (Identifier) (Ext. .DAT)
  422. formatfile        : format file name (Identifier) (Ext. .FMT)
  423. reportfile        : report file name (Identifier) (Ext. .REP)
  424. definitionfile        : definition file (Identifier) (Ext. .DEF)
  425. identifier        : Alpha [ alpha | "_" ...]
  426. .fi
  427. .in 8
  428. .bp
  429. .CH "Create database" CREATE "DBQ Command Reference"
  430. CREATE database fieldname type size [scale] {fieldname ...};
  431. .HB
  432. .HY
  433. database is the database name
  434. .HY
  435. fieldname is a field name
  436. .HY
  437. type is the field type (CHAR | NUM)
  438. .HY
  439. size is the field length
  440. .HY
  441. scale is the scale (decimal places) to be used when printing totals.
  442. The default value is 0 indicating an integer field (no decimal places).
  443. This scale is not used for field storage, although it is indicated
  444. whenever a field is input or updated. Stored decimal places beyond the
  445. scale are ignored in totalling.
  446. .EH
  447. The field name, type, length (and scale if required) are specified for
  448. each field in the record.
  449. .SH Example
  450. create accounts name char 10 acc_num num 6 balance num 8 2 ;
  451. .sp
  452. This creates a database called "accounts", with three fields - name,
  453. acc_num and balance.
  454. .fi
  455. .CH "Insert records" INSERT "DBQ Command Reference"
  456. INSERT database
  457. .SH Details
  458. This command allows records to be inserted in the database.
  459. It prompts for the fields in the record one by one. Brackets show the width
  460. of the field.
  461. [string] and <numeric> fields are indicated by the type of bracket.
  462. A number after <numeric> brackets indicates the number of decimal places.
  463. The brackets are only displayed as a visual guide, and the length shown
  464. is not enforced on input, although any field input longer than the width
  465. shown will be truncated when stored.
  466. .sp
  467. Pressing just ENTER on the first field terminates input, and displays the
  468. number of records inserted.
  469. .SH Example
  470. .nf
  471.     DBQ> insert accounts
  472.  
  473. name         [john smith]
  474. acc_num         <123   >
  475. balance         <2.34    > 2
  476. ------
  477. name         [          ]
  478.  
  479. [ 1 records inserted ]
  480. .fi
  481. .CH "Update records" UPDATE "DBQ Command Reference"
  482. UPDATE {fields | ALL } OF selection;
  483. .HB
  484. .HY
  485. fields is a field list
  486. .HY
  487. selection is a record selection expression
  488. .EH
  489. This allows you to update the specified fields in the selected
  490. records. The original value is printed first, and a prompt is issued
  491. to allow a new value to be input. If no value is entered before
  492. pressing ENTER, the original value is retained. After all records
  493. selected have been updated, a count of records updated is displayed.
  494. .SH Example
  495. update balance of accounts with name = "john smith";
  496. .nf
  497. balance        = 2.34
  498. balance         <       > 2
  499. .fi
  500. .CH "Print records" PRINT "DBQ Command Reference"
  501. .nf
  502. PRINT [USING filename] [{ fieldname[+],
  503.          fieldname[+] . . . | ALL[+] } OF] selection [INTO repname] ;
  504. .fi
  505. .HB
  506. .HY
  507. USING filename indicates a format file (ext=.FMT)
  508. to be used for output formatting.
  509. .HY
  510. field[+] is an optionally qualified field name with optional
  511. totalling (+) specified for numeric fields.
  512. .HY
  513. ALL indicates all fields with optional totalling (+) of all
  514. numeric fields.
  515. .HY
  516. selection is a record selection expression.
  517. .HY
  518. repname is the name of an output file (ext=.REP) to be used instead of the
  519. terminal for output. (LST will cause output to the printer).
  520. .EH
  521. For format file details, see the appropriate section.
  522. .sp
  523. If the format file is not used, output is tabulated under headings in a
  524. fairly simple and straightforward manner. If totalling is specified,
  525. totals are printed for the selected records at the end of the tabulation.
  526. Headings consist of the field names forced to uppercase, with underscores
  527. changed to spaces. Aliases can be used to give the fields alternative
  528. headings.
  529. .sp
  530. Totalling is usually only specified for numeric fields, but character
  531. fields with leading numerics can also be totalled if required.
  532. .SH Example
  533. .nf
  534. print name, acc_num account, balance+ of accounts
  535.          with name } "smith";
  536. .fi
  537. .sp 2
  538. .in -8
  539. .nf
  540.          NAME     ACCOUNT     BALANCE
  541.         ==============================
  542.         a smith        23       12.34
  543.         j smith       124      100.30
  544.         kb smith       21        4.20
  545.         ==============================
  546.                                116.84
  547.         [ 3 records found ]
  548. .fi
  549. .in +8
  550. .CH "Select records" FIND "DBQ Command Reference"
  551. FIND { field, field . . . | ALL } OF selection ;
  552. .HB
  553. .HY
  554. field is an optionally qualified field name
  555. .HY
  556. ALL indicates all fields and can be abbreviated to *
  557. .HY
  558. selection is a record selection expression
  559. .EH
  560. Creates a database called "CURRENT" containing the selected records.
  561. .sp
  562. This command is used to create a working collection of records
  563. which can have sorts, selective deletions or prints made against it.
  564. It can also be used to cut down the processing necessary when
  565. joining a number of databases.
  566. .sp
  567. It can also be used to reformat a database, although other means
  568. are available to achieve this if fields are to be added (see the
  569. section on reformatting).
  570. .sp
  571. The names of fields can be changed by the use of aliases.
  572. .SH Example
  573. find name, acc_num account of accounts with name } "smith";
  574. .br
  575. rename current smiths
  576. .br
  577. print smiths;
  578. .sp
  579. This selects the name field and the acc_num field (renamed to
  580. account) of those records containing the string "smith" in the
  581. name. It then renames the current database as the database "smiths",
  582. and prints it.
  583. .CH "Import records" IMPORT "DBQ Command Reference"
  584. IMPORT filename INTO database
  585. .HB
  586. .HY
  587. filename is the name of a data file (ext .DAT) containing
  588. the values of the fields, one per line.
  589. .HY
  590. database is the name of the database to append the records to.
  591. .EH
  592. .SH Example
  593. DBQ> import accdata into accounts
  594. .SH NOTE
  595. Data to be transferred from a BASIC program should simply be
  596. output one field per line using successive PRINT statements.
  597. .sp
  598. e.g. Subroutine for outputting data, assuming stream 9 is opened
  599. for output, and closed afterwards.
  600. .sp
  601. .nf
  602. 2000 REM OUTPUT DATA FOR DATABASE
  603. 2010 FOR IND% = 1 TO RECCOUNT%
  604. 2020 PRINT #9,ACCNAME$(IND%)
  605. 2030 PRINT #9,ACCNUM%(IND%)
  606. 2040 PRINT #9,ACCBAL(IND%)
  607. 2050 NEXT IND%
  608. 2060 RETURN
  609. .fi
  610. .CH "Export records" EXPORT "DBQ Command Reference"
  611. EXPORT [DELETED] database [INTO filename]
  612. .HB
  613. .HY
  614. database is the name of the database to export records from
  615. .HY
  616. filename is the name of a file (ext .DAT) to receive the records.
  617. If omitted, the records are written to the terminal.
  618. .HY
  619. the "DELETED" option exports those records that have been marked
  620. as deleted since the file was created or compressed. It is used to
  621. recover overambitious deletions.
  622. .HY
  623. records are written to the output file one field per line.
  624. .EH
  625. .SH Example
  626. DBQ> export deleted accounts into deldata
  627. .CH "Extract definition" EXTRACT "DBQ Command Reference"
  628. EXTRACT database [INTO filename]
  629. .HB
  630. .HY
  631. database is the name of a database
  632. .HY
  633. filename is a file (ext .DEF) to receive the definition.
  634. If omitted, the definition is written to the terminal - this
  635. is handy for reminding you what fields are defined.
  636. .HY
  637. The definition is specified as the commands necessary to
  638. create the database again at the current size.
  639. .EH
  640. .SH Example
  641. DBQ> extract accounts
  642. .sp 2
  643. create accounts
  644. .br
  645. name char 10
  646. .br
  647. acc_num num 6
  648. .br
  649. balance num 8 2
  650. .br
  651. ;
  652. .CH "Compress database" COMPRESS "DBQ Command Reference"
  653. COMPRESS database
  654. .SH Details
  655. - database is a database name.
  656. .sp
  657. This compresses active records at the start of the database file,
  658. and frees up space at the end for further records to be added.
  659. .SH Example
  660. DBQ> compress accounts
  661. .br
  662. [20 records freed]
  663. .SH NOTE
  664. To reduce the size of the file as well, assuming there is sufficient
  665. disk space, the following sequence may be used instead
  666. .sp 2
  667. DBQ> find all of <database>;
  668. .br
  669. DBQ> print; # To check if everything is O.K. before erasing old file
  670. .br
  671. DBQ> erase <database>
  672. .br
  673. DBQ> rename current <database>
  674. .CH "Sort database" SORT "DBQ Command Reference"
  675. SORT database BY keyname1 {, keyname2} . . . ;
  676. .HB
  677. .HY
  678. database is a database name
  679. .HY
  680. keyname is the name of a field to sort on, optionally followed
  681. by "ASC" (default) or "DESC".
  682. .HY
  683. The sort order is major through minor (e.g. keynameN
  684. within keynameN-1 . . . within keyname2 within keyname1).
  685. .HY
  686. Records are sorted in situ. It takes a while for a large database.
  687. .HY
  688. It is not advisable to abort a sort halfway through - be patient.
  689. .EH
  690. .SH Example
  691. sort accounts by name, balance desc;
  692. .CH "Erase a database" ERASE "DBQ Command Reference"
  693. ERASE database
  694. .SH Details
  695. - database is the name of a database
  696. .sp
  697. The named database file is erased from the disk. It cannot be
  698. recovered except by immediate use of a program such as UNERA.
  699. .sp
  700. This command is equivalent to the CPM ERA command, which
  701. can be used as an alternative.
  702. .SH Example
  703. DBQ> erase current
  704. .CH "Rename database" RENAME "DBQ Command Reference"
  705. RENAME olddatabase newdatabase
  706. .HB
  707. .HY
  708. olddatabase is the existing name of a database
  709. .HY
  710. newdatabase is the desired new name for the database
  711. .EH
  712. The use of this command results in the same action as use of
  713. the CPM REN command, which can be used as an alternative.
  714. .SH Example
  715. DBQ> find all of employees with dept = 300;
  716. .br
  717. DBQ> rename current ourdept
  718. .CH "Define procedure" DEFINE "DBQ Command Reference"
  719. DEFINE procname
  720. .HB
  721. .HY
  722. procname is the name of the procedure to be defined
  723. .EH
  724. DBQ prompts you for the definition on subsequent lines. An empty line
  725. is used to terminate the definition. As procedure definitions overwrite
  726. previous definitions, a null definition effectively deletes a procedure.
  727. .sp 2
  728. Procedures can be used for a wide range of purposes.
  729. .sp
  730. In its most simple form it can be used to set up synonyms
  731. for the query language command keywords for a non-English
  732. language, or for personal preference.
  733. Also it can be used for the following :-
  734. .sp
  735. To replace sequences of words with a single keyword.
  736. .sp
  737. To specify part of, or all, a complex query.
  738. .sp
  739. To specify a sequence of commands.
  740. .sp
  741. To specify a sequence of commands with variable parameters input
  742. via the ENTER command (see ENTER command for details).
  743. .sp
  744. Procedures can be nested. That is, a procedure can refer to another
  745. procedure within its definition. Procedures referring to procedures
  746. referring back to the original will cause problems when used, and
  747. must be avoided.
  748. .SH Example
  749. DBQ> define total
  750. .br
  751. DEFINE> print all+ of
  752. .br
  753. DEFINE>
  754. .br
  755. DBQ> total accounts;
  756. .CH "Show procedure" SHOW "DBQ Command Reference"
  757. SHOW procname
  758. .sp
  759. SHOW ;
  760. .HB
  761. .HY
  762. procname is the name of the procedure to be listed
  763. .HY
  764. if procname is replaced by a terminator or keyword,
  765. a list of currently defined procedures is shown.
  766. .EH
  767. .SH Example
  768. DBQ> show list
  769. .sp
  770.         print all of
  771. .br    
  772. DBQ> show ;
  773. .sp
  774.         list
  775. .br
  776. DBQ>
  777. .CH "Prompt for value" ENTER "DBQ Command Reference"
  778. ENTER procname
  779. .sp
  780. ENTER "procname"
  781. .SH Details
  782. - procname is an identifier
  783. .sp
  784. Causes a prompt to be issued for the identifier, and after reading one
  785. line, sets the procedure to that value. A null entry deletes the procedure.
  786. This is used in command files, and in other procedures, to prompt for input
  787. as part of a sequence of commands. The procedure in this case is just a
  788. simple value, but it is called in the same manner as a full multiline procedure.
  789. .sp
  790. Where the procname is specified inside quotation marks, it indicates that the
  791. definition should be contained within quotation marks. This is used when
  792. entering string literals for comparison purposes.
  793. .SH Example
  794. .nf
  795.     DBQ> define findemp
  796.     DEFINE> enter empno:
  797.     DEFINE> enter "name:"
  798.     DEFINE> print all of employees with empno = empno:
  799.     DEFINE> and name = name: ;
  800.     DEFINE>
  801.     DBQ> findemp
  802.     DBQ> Enter empno:
  803. .fi
  804. .CH "Set options" SET "DBQ Command Reference"
  805. SET [NO] [FOLD] [VERIFY] [LOG] [PAGE];
  806. .SH Details
  807. This permits options to be set, or unset if "NO" is first specified.
  808. .sp
  809. The options are:-
  810. .SH NO
  811. The word "NO" changes the sense of the setting to that of unset.
  812. Thus "SET NO FOLD;" would unset the fold option.
  813. .SH FOLD
  814. Fold permits alphabetic case folding on comparisons.
  815. .sp
  816. e.g. "FrEd" would match with "fReD"
  817. .SH VERIFY
  818. Verify causes the contents of command files to be output during execution.
  819. This may be used to check that the command file is running correctly. Comments
  820. should be inserted in the command file to keep track of where you are.
  821. .SH LOG
  822. Log causes a log file to be created, and all input from the terminal to
  823. be written to it. Unsetting log simply switches off the writing, and
  824. subsequent setting of the log simply switches on the writing again.
  825. .sp
  826. When the "exit" command is issued, the file is closed and a message output
  827. saying that it has been closed, prior to DBQ finishing.
  828. .SH PAGE
  829. Page allows pagination to be done on tabulations. Simply setting page will
  830. set a pagelength of 60 detail lines, correct for 11 inch depth paper. Other
  831. page depths can be accomodated by quoting the number of detail lines to be
  832. printed per page after the set page command.
  833. .sp
  834. e.g. set page 20
  835. .sp
  836. sets the pagelength at 20 detail lines.
  837. .sp
  838. If page in unset, an effective page length of 32000 is set up, and no page
  839. number will be printed.
  840. .sp
  841. Pagination is effective on both normal print tabulations and on format file
  842. driven output, for which a special value may again be required depending on
  843. page layout.
  844. .SH "Set display"
  845. After the options have been set or unset, the current settings are displayed.
  846. Each option name is followed by a number. For FOLD, VERIFY and LOG, a value
  847. of 0 indicates unset, and 1 indicates set. For PAGE, the page length is
  848. displayed.
  849. .SH Example
  850. set fold page 62 no verify ;
  851. .sp
  852. Fold = 1, verify = 0, log = 0, page = 62
  853. .CH "Online help" HELP "DBQ Command Reference"
  854. HELP
  855. .sp
  856. ?
  857. .SH Details
  858. This causes an initial page of help information to be output to the
  859. terminal. A prompt is then issued to press ^Z, ENTER, or a character.
  860. .sp
  861. If ENTER is pressed, the next page of help is printed.
  862. .sp
  863. If ^Z is pressed, the program returns to the DBQ> prompt.
  864. .sp
  865. If a character is pressed, the next help page relating to a topic
  866. starting with that character is displayed. If a character is pressed
  867. which is not the initial of any remaining help frame, DBQ returns to
  868. the DBQ> prompt.
  869. .SH Example
  870. DBQ> help
  871. .sp
  872. --- page of help ---
  873. .sp
  874. Press ^Z to abort, ENTER to continue, or x for help on x...
  875. .br
  876. c
  877. .sp
  878. --- page of help on "create" ---
  879. .CH "Exit from DBQ" EXIT "DBQ Command Reference"
  880. EXIT
  881. .SH Details
  882. This returns you to the CPM+ prompt.
  883. .sp
  884. If a log file is currently open (although not necessarily being written
  885. to), it is closed and a message to that effect is displayed.
  886. .SH Example
  887. DBQ> exit
  888. .br
  889. A>
  890. .CH "Command files" @ "DBQ Command Reference"
  891. @filename
  892. .SH Details
  893. - filename is the full name of a file containing commands.
  894. .sp
  895. This causes the contents of the specified file to be inserted at the
  896. current point in the input. The command file may contain any input,
  897. apart from the response to an "enter" request.
  898. .sp
  899. If "verify" is set, the contents of the file are output to the terminal
  900. as it is read.
  901. .sp
  902. If the file "DBQINIT.CMD" is present when DBQ is started, it is executed
  903. initially, and can be used to set up procedure definitions etc.
  904. .sp
  905. Comments can be inserted in a command file, or indeed in direct input,
  906. by preceding them with "#". Everything on a line after a "#" is ignored.
  907. .sp
  908. The ENTER command can be used to input variable data for use within the
  909. command file, in a similar manner as within a procedure. Also, an ENTER
  910. command for a dummy variable can be used to halt the command file execution
  911. until you respond to the enter request. The dummy variable can be immediately
  912. used as a command on the next line, and will allow you to enter "exit" to
  913. exit from DBQ if there is a problem.
  914. .TH "Database administration" MAINTENANCE "DBQ Usage notes"
  915. .SH Introduction
  916. To effectively control your databases, it is necessary to think beyond
  917. just setting them up and using them.
  918. .sp
  919. This section describes some requirements of proper database administration
  920. and suggests ways of achieving these.
  921. .SH "Setting up"
  922. A number of things can be done to make life easier when using DBQ.
  923. The DBQINIT.CMD file can be used to set up procedures to be used either
  924. generally or against a specific database. These procedures may be simple
  925. abbreviations for database print requests etc. or they can be larger
  926. sequences of commands to enable interactive working against the database
  927. using the "enter" command.
  928. .sp
  929. It is also possible, on the Amstrad CPC, to set up common commands on
  930. the keypad. A sample keypad definition file is provided which can be
  931. used as the basis of a custom keypad definition. The CCP key configuration
  932. is useful also, as it sets the cursor keys to support the CCP editing
  933. functions used by DBQ.
  934. .SH Security
  935. Security covers two aspects of data management. The first is the protection
  936. of confidential information. For personal computers this is not usually a
  937. problem, but if you do share a machine with others, it is suggested that
  938. you keep confidential databases on specific disks which you can put in a
  939. safe place.
  940. .sp
  941. The other aspect of security is insurance against data loss. This can be
  942. achieved for most purposes by making regular backup copies of your database
  943. disks. If you are planning on doing a long session on a database, firstly
  944. copy the database to a backup disk, then set the log option when you start
  945. the DBQ session. If something goes wrong during the session, the log file
  946. will contain the commands you entered and can be used as a command file
  947. against a new copy of the database from the backup (do not use the backup
  948. itself!). It is possible to edit the command file to truncate the file
  949. at some known point. It is then possible to recover nearly up to the point
  950. at which things went wrong.
  951. .SH Reformatting
  952. It is possible to reformat the database in a number of ways.
  953. .sp
  954. When a FIND
  955. command is done, a CURRENT database is created which can be renamed as
  956. a permanent database. Thus fields can be renamed or dropped, or data from
  957. more than one database can be used to form a new one. If a new field is
  958. needed in a database, it can be added by creating a temporary database with
  959. just one record containing the new field or fields in it, with the initial
  960. value, and joining this with the main database in a select operation.
  961. .sp
  962. It is also possible to reformat a database by exporting the records, creating
  963. a new database with the required format, editing the data file and importing
  964. the datafile into the new database. It may be useful to specify a format file
  965. to create an output file already in the new format to be imported - e.g.
  966. .sp
  967. >field2<
  968. .br
  969. >field1<
  970. .br
  971. newfield value
  972. .br
  973. >field3<
  974. .sp
  975. If this is used to PRINT the old database containing three fields, the
  976. data can then be imported into the new database containing four fields.
  977. .TH "General notes" "GENERAL" "DBQ usage notes"
  978. .SH "General points"
  979. DBQ is designed to be simple to use, and reasonably foolproof. There
  980. is no need to explicitly open or close databases, or to do saves to the
  981. disk, as the database is opened and closed for each operation. This means
  982. that when you are at the DBQ prompt, there are no databases currently
  983. open, and it is safe to abort the program using ^C, or by taking out the
  984. disk and switching off the computer.
  985. .SH "Query style"
  986. Whilst the query facility is very powerful, it is often not the best
  987. approach to request a large complex selection at one go. If you are using the
  988. query facility as a means of choosing from the available records, it is
  989. better to firstly see how many records a more general search will produce,
  990. and then add further refinements until a suitable subset is found. For
  991. example, if we have a database of cars containing information about all
  992. current production cars, and we wish to select one to suit a particular
  993. customer, we can reduce the selection on some important criteria firstly,
  994. such as the price, and then select from the resultant cars. For example:-
  995. .sp
  996. DBQ> find cars with price < 5000 and price > 2500;
  997. .br
  998. DBQ> print current with doors = 4 and mpg > 40;
  999. .SH "Making a log file"
  1000. There are two ways of making a logfile of the interaction with DBQ. The
  1001. SET LOG option allows input to be logged, and the resultant file can be
  1002. used as a command file, either directly or after being edited.
  1003. .sp
  1004. It is also possible to use the CPM+ 'put' transient to redirect the
  1005. console output to a file, for example by using the
  1006. command 'put console to file conout.log'. This will permit a full log of
  1007. both input and output to be obtained.
  1008. .SH "Joining multiple databases"
  1009. One of the properties relational databases is the ability to join
  1010. together the data from two or more databases, based on the relationship
  1011. between them. DBQ uses the power of the selection expression to not only
  1012. express the required relationship between the databases, but also to
  1013. select from the resultant data that which meets selection criteria in
  1014. the same manner as selection from a single database. The relationship
  1015. can be expressed not only in terms of single field equivalence, but of
  1016. multi-field relationships.
  1017. .sp
  1018. For a simple multi-database join, a straightforward comparison on the
  1019. related fields is all that is required.
  1020. .sp
  1021. DBQ> print all of orders, parts with order.partno = parts.partno;
  1022. .sp
  1023. For a more complex join, the required relationship will need further
  1024. specification.
  1025. .sp
  1026. DBQ> print all of employees, depts with employees.dept >=
  1027. .br
  1028. DBQ> depts.lowdept and employees.dept <= depts.highdept;
  1029. .sp
  1030. This joins the employees file with the department records for which they
  1031. are within the department number range.
  1032. .sp 2
  1033. For selections involving more than two databases, the extra relations
  1034. can be specified between any of the participating databases. It is also
  1035. possible to join a database with itself, although this demands the use of
  1036. a database name alias, and appropriate qualification. Further details of this
  1037. are provided in the section on aliases.
  1038. .SH Limitations
  1039. The various limits that DBQ has on data storage are as follows:-
  1040. .sp
  1041. Maximum size of any one database file - 64k bytes.
  1042. .sp
  1043. Maximum numeric field length (including sign and point) - 12 bytes.
  1044. .sp
  1045. Maximum number of decimal places - 10.
  1046. .sp
  1047. Maximum character field length - 128 characters.
  1048. .sp
  1049. Maximum number of fields in database - 30.
  1050. .sp
  1051. Maximum field name length - 10 characters.
  1052. .sp
  1053. Maximum database name length - 10 characters.
  1054. .sp
  1055. Maximum procedure name length - 10 characters.
  1056. .sp
  1057. Maximum command line length - 128 bytes.
  1058. .br
  1059. - Although a number of lines can make up a command.
  1060. .sp 2
  1061. As well as these limits, there is a limit on the amount of dynamic
  1062. memory that can be allocated for file buffers, etc. This is quite
  1063. high, and handles a fairly complex query against three database
  1064. files of 5 fields at the same time as using a command file for input,
  1065. a format file for output formatting, output to a report file, with a
  1066. current log file being produced, and with about 2k to 3k of procedure
  1067. definitions. Details of how to deal with a memory full error are
  1068. contained in the section on error messages.
  1069. .TH "Output formatting" "REPORTS" "DBQ usage notes"
  1070. .SH "Report formatting"
  1071. The PRINT command normally lists the records in tabular form. Other
  1072. formats are possible using the format file. The USING option on the PRINT
  1073. command can specify the name of a format file (Default extension .FMT).
  1074. This format file contains the text to be output, together with an indication
  1075. of where the fields are to be printed. In its simplest form, it contains the
  1076. field specifiers only, but it can also contain heading text and a flag
  1077. character to cause a pause at the terminal after each record.
  1078. .sp
  1079. .SH "Field specifiers"
  1080. Field specifiers come in two forms, as follows.
  1081. .sp
  1082. <fieldname>
  1083. .sp
  1084. and
  1085. .sp
  1086. >fieldname<
  1087. .sp
  1088. The first of these indicates that the field should be printed as its full
  1089. width. For character fields, the field is left justified with space fill
  1090. to the right. For numeric fields, the field is right justified with space
  1091. fill to the left.
  1092. .sp
  1093. The second form indicates that the field should be printed in minimum
  1094. width form, whereby only the necessary characters are printed, and no
  1095. space fill occurs. This form is used for such purposes as mailmerge
  1096. where the surrounding text can be properly concatenated with the field
  1097. value.
  1098. .sp
  1099. Note that the field name used can be the normal field name, or an alias
  1100. if one has been specified. It is preferable to use aliases if qualification
  1101. is otherwise necessary due to the field name not being unique to one
  1102. database.
  1103. .SH "Heading specification"
  1104. A percent sign "%" at the start of the file indicates that any following
  1105. text up to the next percent sign is heading text and should only be output
  1106. once at the start. Careful positioning of the percent signs permits the
  1107. correct spacing of the heading lines. The number of heading lines should
  1108. be used when calculating any page length setting.
  1109. .sp
  1110. When pagination is in effect (see the SET PAGE option), the heading will
  1111. be printed every time the specified number of records have been printed.
  1112. Careful specification of the text areas is necessary to achieve correct
  1113. results from this, and some experimentation is invariably necessary.
  1114. .sp
  1115. A number sign ("#") within the heading text will be replaced by the current
  1116. page number. The number sign will also be recognized within the detail
  1117. text, and permits the page number to be output for each record if desired.
  1118. .SH "Pause specification"
  1119. A question mark "?" at the end of the format file indicates that the
  1120. output should stop at this point before printing the next record. The
  1121. operator may then press ENTER to print the next record, or ^Z to stop
  1122. the printing.
  1123. .sp
  1124. This may be used for browsing through the file on the screen, or for
  1125. printing mail merge output onto single sheets of paper.
  1126. .SH "Uses of format files"
  1127. The format file facilities provide a range of formatting possibilities
  1128. beyond the immediately obvious. The following list provides some
  1129. suggestions, although these are by no means all the possibilities.
  1130. .sp
  1131. Alternative tabulations, with differing heading styles with page numbering
  1132. at specified points. Single, double, triple or indeed any line spacing.
  1133. Unit specifiers for value fields (e.g. 25143 cwt, 96 cc, etc.).
  1134. Fields duplicated on same or different lines.
  1135. .sp
  1136. Paged browsing, using nicely formatted screens containing the fields in
  1137. forms with fancy titles, side headings and borders.
  1138. .sp
  1139. Printout of database onto forms, again with headings etc.
  1140. .sp
  1141. Mail merge, using a letter produced on a word processor, with field
  1142. specifiers at appropriate points.
  1143. .sp
  1144. Formatting of data for input to a BASIC or other applications program.
  1145. (e.g. ">string field<",>numeric field<,constant data,>another field<).
  1146. .sp
  1147. Formatting of data to permit reformatting of the database file itself.
  1148. An example of this is given in the section on reformatting.
  1149. .sp
  1150. Label printing, using a simple format file.
  1151. .sp 2
  1152. And of course the data used in these various formats of output can come
  1153. from selected fields from a complex selection from more than one database.
  1154. .TH "Messages and Errors" MESSAGES "DBQ User manual"
  1155. .SH Introduction
  1156. The following list of messages describe the likely cause of each
  1157. error situation, and where applicable corrective action that may be
  1158. taken.
  1159. .SH "Informational messages"
  1160. These messages are printed for your information, and do not indicate that
  1161. anything has gone wrong.
  1162. .sp
  1163. The following informational messages will appear.
  1164. .sp
  1165. DBQ.LOG closed
  1166. .sp
  1167. .in 12
  1168. This is output when an EXIT command is issued, if the log file has been
  1169. opened using the SET LOG command. It is used to remind you that the log
  1170. file has been written, and that you should either do something with the
  1171. log file, or delete it to free up the disk space occupied.
  1172. .sp
  1173. .in 8
  1174. Fold = ?, verify = ?, log = ?, page = ??
  1175. .sp
  1176. .in 12
  1177. This is output whenever a SET command is issued, to show the resultant
  1178. settings.
  1179. .sp
  1180. .in 8
  1181. Press ENTER to continue, ^Z to quit, x for help on x...
  1182. .sp
  1183. .in 12
  1184. This is output after each page of HELP information displayed, and gives
  1185. you the option of viewing the next help page, quitting from the help
  1186. display, or looking for the next help topic starting with the given
  1187. letter.
  1188. .sp
  1189. .in 8
  1190. [ nnn records xxxxxx ]
  1191. .br
  1192. .in 10
  1193. Where xxxxxx can = Found, Updated, Inserted, Deleted or Freed.
  1194. .sp
  1195. .in 12
  1196. This is output whenever a PRINT, FIND, UPDATE, INSERT, DELETE or
  1197. COMPRESS command is issued, and indicates the number of records
  1198. taking part in the operation.
  1199. .sp
  1200. .in 8
  1201. Press ENTER to continue, ^Z to quit
  1202. .sp
  1203. .in 12
  1204. This is output after each record is printed, if the prompting
  1205. character is specified in a format file.
  1206. .sp
  1207. .in 8
  1208. nnnn swaps in nnnn passes
  1209. .sp
  1210. .in 12
  1211. This is output after a sort operation completes, to indicate how many
  1212. record swaps took place. A large number will indicate that the file was
  1213. not close to the sort order requested.
  1214. .br
  1215. .in 8
  1216. .bp
  1217. .SH "Error messages"
  1218. These messages indicate that the requested action could not be performed
  1219. as requested. In certain cases a complete query may have been recognized
  1220. up to the point of a syntax error. In this case, the query will have been
  1221. actioned, but error will also be reported.
  1222. .sp
  1223. These errors will be printed in the general form:-
  1224. .sp
  1225. ### Error: error details ###
  1226. .sp
  1227. Where "error details" are specific error types, and will be one of the
  1228. following:-
  1229. .sp
  1230. syntax error
  1231. .sp
  1232. .in 12
  1233. This is the most common message and indicates that DBQ did not understand
  1234. the command that you issued. Generally, this means that you have typed
  1235. a command name or other keyword incorrectly, but can mean that the order
  1236. of the words in the command is incorrect, or that certain options are not
  1237. available on the command. It can also be caused by a string literal not being
  1238. enclosed in quotation marks.
  1239. .sp
  1240. If you are in doubt about what word the error was raised on, try typing the
  1241. command in one word to a line. As soon as an error is detected, the message
  1242. will be output. Whilst this helps in the majority of cases, in some cases
  1243. the actual word or construct in error is earlier on in the query, and is
  1244. only brought to light when the command is terminated.
  1245. .sp
  1246. .in 8
  1247. set parameter unknown
  1248. .sp
  1249. .in 12
  1250. An incorrect option has been specified for the SET command. Check the
  1251. spelling of options in the SET command.
  1252. .sp
  1253. .in 8
  1254. memory full
  1255. .sp
  1256. .in 12
  1257. This message indicates that the dynamic memory of the system is full.
  1258. .sp
  1259. If this message is reported, steps can be
  1260. taken to release some memory, by deleting unwanted procedures, and by
  1261. not using a log file. It is recommended that an exit is made, and
  1262. DBQ restarted, without defining unwanted procedures, and without
  1263. starting a log file. This will remove any fragmented dynamic memory,
  1264. and provide the maximum space to run a query. If this still fails,
  1265. the query will have to be reduced in size or complexity.
  1266. .sp
  1267. It may help on a query against a number of databases
  1268. to use the FIND command to select the required data into a temporary
  1269. database as an intermediate step, and reduce the overhead caused by
  1270. having a number of databases open. Quite often a little experimentation
  1271. will cure the problem.
  1272. .sp
  1273. .in 8
  1274. disk full
  1275. .sp
  1276. .in 12
  1277. This indicates that the disk to which you are writing does not have enough
  1278. space to write a file. You should exit from DBQ and tidy up the disk
  1279. before proceeding.
  1280. .sp
  1281. .in 8
  1282. database file not found
  1283. .sp
  1284. .in 12
  1285. The database file that you specified does not exist. Either you have
  1286. mispelled the name of the database, or you are using the wrong disk.
  1287. .sp
  1288. .in 8
  1289. database name undefined
  1290. .sp
  1291. .in 12
  1292. The database name specified in a selection expression has not been
  1293. used in the database name list of the command.
  1294. .sp
  1295. .in 8
  1296. bad file header
  1297. .sp
  1298. .in 12
  1299. The database file specified does not have a valid DBQ header section.
  1300. You may have renamed a non-DBQ file with the .DBQ extension, or the
  1301. database file may have been corrupted in some manner. Restore the latest
  1302. backup copy and bring the database up to date. If you don't have a backup
  1303. copy, read the section on database administration, ready for the next
  1304. disk corruption.
  1305. .sp
  1306. .in 8
  1307. creating database
  1308. .sp
  1309. .in 12
  1310. An error has occurred whilst creating the database. This may be due to
  1311. the database name already being in use, or the disk being write protected.
  1312. .sp
  1313. .in 8
  1314. field name duplicated
  1315. .sp
  1316. .in 12
  1317. When creating a database, a fieldname has been used more than once.
  1318. .sp
  1319. .in 8
  1320. field name ambiguous
  1321. .sp
  1322. .in 12
  1323. Within a query, a field name has been used that appears in more than one
  1324. of the databases named. In this case, the name should be qualified by
  1325. prefixing it with the database name and a full stop.
  1326. .sp
  1327. .in 8
  1328. expression too complex
  1329. .sp
  1330. .in 12
  1331. A selection expression has been used that is too complex to parse. It is
  1332. usually necessary to reduce the complexity. It may be sufficient to specify
  1333. the expression in a different manner.
  1334. .sp
  1335. .in 8
  1336. too many fields
  1337. .sp
  1338. .in 12
  1339. Too many fields have been specified for a database, during a CREATE
  1340. operation.
  1341. .sp
  1342. .in 8
  1343. reading record
  1344. .sp
  1345. .in 12
  1346. An error occurred when reading a record. This may be due to the disk
  1347. having been removed.
  1348. .sp
  1349. .in 8
  1350. writing record
  1351. .sp
  1352. .in 12
  1353. An error occurred when writing a record. This may be caused by the disk
  1354. being full, or by the disk being removed during the command.
  1355. .sp
  1356. .in 8
  1357. input file not found
  1358. .sp
  1359. .in 12
  1360. The input file specified cannot be found on the disk.
  1361. .sp
  1362. .in 8
  1363. creating output file
  1364. .sp
  1365. .in 12
  1366. An error occurred whilst attempting to create the specified output file.
  1367. This may be due to the file already existing, or the disk being write
  1368. protected.
  1369. .sp
  1370. .in 8
  1371. command file not found
  1372. .sp
  1373. .in 12
  1374. The specified command file could not be found on the disk.
  1375. .sp 2
  1376. .in 8
  1377. Also the following error messages may appear as shown:-
  1378. .sp
  1379. ### Maximum line length is 128 ###
  1380. .br
  1381. Re-enter>
  1382. .sp
  1383. .in 12
  1384. An input line longer than the allowed maximum has been used. To
  1385. overcome this problem simply split the command up and enter it on
  1386. multiple lines.
  1387. .sp
  1388. .in 8
  1389. ### Out of memory using <procname> ###
  1390. .sp
  1391. .in 12
  1392. Dynamic memory was exhausted when attempting to expand the named
  1393. procedure. See the 'memory full' error for an explanation of likely
  1394. causes and suggested remedial action.
  1395. .sp
  1396. .in 8
  1397. ### Error opening ICF <filename> ###
  1398. .sp
  1399. .in 12
  1400. An error occurred when attempting to open the indirect command file named.
  1401. .sp
  1402. .in 8
  1403. ### Procedure <procname> not found ###
  1404. .sp
  1405. .in 12
  1406. A definition for the named procedure could not be found.
  1407. .sp
  1408. .in 8
  1409. Sorry - help file not available.
  1410. .sp
  1411. .in 12
  1412. The help file 'DBQ.HLP' is not present on the disk. You will probably
  1413. have removed it due to its size. It is possible to produce a reduced
  1414. file with just the summary details on it by editing the full file, after
  1415. taking a backup copy. You can add any useful information or personal
  1416. notes and hints at the end of the file.
  1417. .br
  1418. .in 8
  1419. .bp
  1420. .SH "Other error situations"
  1421. Other occasions may arise where an erroneous situation can be assumed to
  1422. exist. Certain obscure combinations of circumstance may, perhaps, result
  1423. in the computer entering a "hard loop". This situation is easy to detect,
  1424. as it is impossible to break out of the program by the usual means of
  1425. pressing control-C, and the disk drives may remain running but not doing
  1426. anything. If this is the case (and you have not pressed a combination of
  1427. keys which switches the printer output on when a printer is not attached,
  1428. which results in an error message being displayed by CPM+ on the bottom
  1429. line of the screen after a delay of around 20 to 30 seconds),
  1430. it will be necessary to carefully shut the computer down and reboot CPM.
  1431. e screen after a delay of around 20 to 30 seconds),
  1432. it will be necessary to carefully